import request from '@/utils/request'

// 查询exercise列表
export function listExercise(query) {
  return request({
    url: '/teacher/exercise/list',
    method: 'get',
    params: query
  })
}

// 查询exercise详细
export function getExercise(exerciseId) {
  return request({
    url: '/teacher/exercise/' + exerciseId,
    method: 'get'
  })
}

// 新增exercise
export function addExercise(data) {
  return request({
    url: '/teacher/exercise/add',
    method: 'post',
    data: data
  })
}

// 修改exercise
export function updateExercise(data) {
  return request({
    url: '/teacher/exercise/update',
    method: 'post',
    data: data
  })
}

// 删除exercise
export function delExercise(exerciseId) {
  return request({
    url: '/teacher/exercise/' + exerciseId,
    method: 'post'
  })
}
